local zhanmeng = fk.CreateSkill {
  name = "lingling__zhanmeng",
}

Fk:loadTranslationTable{
  ["lingling__zhanmeng"] = "占梦",
  [":lingling__zhanmeng"] = "当你的判定牌生效后，你可以获得此牌。",
}

zhanmeng:addEffect(fk.FinishJudge, {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(zhanmeng.name) and
      data.card and player.room:getCardArea(data.card) == Card.Processing
  end,
  on_use = function(self, event, target, player, data)
    player.room:obtainCard(player, data.card, true, fk.ReasonJustMove, player, zhanmeng.name)
  end,
})

return zhanmeng
